package org.example.musicproject.service.impl;

import org.example.musicproject.dao.SingerDao;
import org.example.musicproject.dao.impl.SingerDaoImpl;
import org.example.musicproject.entity.Singer;
import org.example.musicproject.service.SingerService;

import java.sql.Connection;
import java.util.Collections;
import java.util.List;

/**
 * 创建人:黄庭萍
 * 创建时间: 2024/12/16 19:43
 * 创建类型: SingerServiceImpl
 */
public class SingerServiceImpl implements SingerService {
    final SingerDao dao = new SingerDaoImpl();
    @Override
    public List<Singer> all() {
        return dao.all();
    }

    @Override
    public Singer byId(int id) {
        return dao.byId(id);
    }

    @Override
    public long add(Connection conn, Singer singer) {
        return dao.add(conn, singer);
    }

    @Override
    public int update(Singer singer) {
        return dao.update(singer);
    }

    @Override
    public List<Singer> bykey(String key) {
        return dao.bykey(key);
    }
}
